package com.xinruke.hostels.manage.user.mapper;

import com.xinruke.hostels.common.po.XtYonghujueseGuanxi;
import com.xinruke.hostels.manage.user.interfaces.dto.UserRolesQueryResultDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface XtYonghujueseGuanxiMapper extends Mapper<XtYonghujueseGuanxi>, InsertListMapper<XtYonghujueseGuanxi> {


    @Update("update xt_yonghujuese_guanxi s set s.`shanchubiaoshi` = 1 where  s.yewuyonghu_id = #{yewuyonghuId}")
    Integer delUserRoleByUserId(@Param("yewuyonghuId") Integer userId);

    List<UserRolesQueryResultDto> selectRolesByUserId(@Param("userId")Integer userId);
}